<?php

namespace common\validate;


class Shot extends BaseValidate
{
    // 验证规则
    protected $rule = [];

    public function sceneShotStatus()
    {
        return $this->append('data.id', 'require|integer')
            ->append('data.status', 'require|in:Abo,Ena');
    }

    public function sceneSeqStatus()
    {
        return $this
            ->append('data.project_id', 'require|integer')
            ->append('data.storyboard_sequence', 'require')
            ->append('data.initial_episode_code', 'require')
            ->append('data.status', 'require|in:Abo,Ena');
    }

    // RelateStoryboardList 验证条件
    public function sceneRelateStoryboardList()
    {
        return $this
            ->append('param.id', 'require|integer')
            ->append('param.fields', 'require')
            ->append('param.page', 'require|array')
            ->append('param.fields', 'require');
    }

    // UnRelateStoryboardList 验证条件
    public function sceneUnRelateStoryboardList()
    {
        return $this
            ->append('param.id', 'require|integer')
            ->append('param.fields', 'require')
            ->append('param.page', 'require|array')
            ->append('param.fields', 'require');
    }

    // SetRelateStoryboard 验证条件
    public function sceneSetRelateStoryboard()
    {
        return $this
            ->append('param.id', 'require|integer')
            ->append('param.relate_id_list', 'require|array')
            ->append('param.action', 'require|in:delete,add');
    }

    // SetKeyShot 验证条件
    public function sceneSetKeyShot()
    {
        return $this
            ->append('param.shot_id_list', 'require|array')
            ->append('param.is_key_shot', 'require|in:yes,no');
    }
}
